import Vue from 'vue'
import Router from 'vue-router'

const HelloWorld = r => require.ensure([], () => r(require('@/components/HelloWorld')), 'manage');
const m22 = r => require.ensure([], () => r(require('@/components/paging22')), 'm22');
const m220 = r => require.ensure([], () => r(require('@/components/paging220')), 'm220');
const m221 = r => require.ensure([], () => r(require('@/components/paging221')), 'm221');


Vue.use(Router)

const rout = [
  {
    path: '/',
    component: HelloWorld,
    redirect:{
      name:''
    }
  },
  {
    path: '/manage',
    component: HelloWorld,
    name: '',
		children: [{
			path: '',
			component: m22,
			meta: [],
    },
    {
      path: 'm220',
      component: m220,
      meta: ['数据管理', '用户列表'],
    },
    {
      path: 'm221',
      component: m221,
      meta: ['数据管理', '商家列表'],
    }]
  }
]

export default new Router({
  mode: 'history',
  routes: rout,
  // strict: process.env.NODE_ENV !== 'production',
})
